﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true"
    CodeFile="Customerallinfo.aspx.cs" Inherits="Customerallinfo" meta:resourcekey="PageResource1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<title>تقارير اشتراكات الجهات</title>
<style>
.zr3 {
	background-image:url('images/button2.png');
	display:block;
	float:right;
	 padding: 0px 10px 0px 10px;
	height:21px;
	text-align:center;
	color:#fff;
	text-shadow:1px 1px 0px #003a5e;
	margin-right:2px;
	line-height:19px;
	font-weight:bold;
	text-decoration:none;
	font-family:Tahoma;
	font-size:12px;


}
.zr3:hover ,.zr3:active {
	background-image:url('images/button2.png');
	text-shadow:1px 1px 0px #003a5e;
	background-position:0px -21px;
	
}
  .stylelabel3
       {
       	color:#064c66;
	 font-weight:bold;
	 direction:rtl;
	 text-align:right;
       	}
             .tab3{
	width:815px;
 direction:rtl;
 border:1px #ccc solid;
 border-radius:5px;
 }

tr .tabbone3{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:center;
	
}
 .req3
       {
           color:Red;
       } 
.adel3{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  center;
}
.he3{
	background-color:#fff;
	padding:5px;
	font-family:Tahoma;
	font-size:14px;
	font-weight:bold;
}
        .jqmWindow {
    display: none;
    
    position: fixed;
    top: 17%;
    left: 50%;
    
    margin-left: -300px;
    width: 800px;
    
    background-color: #EEE;
    color: #333;
    border: 1px solid black;
    padding: 12px;
}

</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<br />
    <div id="selects" runat="server" align="center">
    <table class="tab3">
    <tr >
    <td class="tabbone3">

        <asp:Label ID="Label14" runat="server" Text="اسم الجهة" meta:resourcekey="orgnamelabel"></asp:Label>

    </td>
    </tr>
    <tr>
    <td class="adel3">
    
        <asp:DropDownList ID="currentsubs" style="border:1px solid black" runat="server" DataSourceID="SqlDataSource2" DataTextField="company"
            DataValueField="id" AutoPostBack="true" AppendDataBoundItems="True" OnSelectedIndexChanged="currentsubs_SelectedIndexChanged">
        </asp:DropDownList>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="select company ,id from companies "></asp:SqlDataSource>
    
    </td>
    </tr>
    </table>
    <br />
    </div>
    <asp:GridView ID="GridView1" runat="server"   
        AutoGenerateColumns="False" 
        Font-Size="Large" AllowPaging="True" DataSourceID="SqlDataSource1" 
        EnableModelValidation="True" GridLines="None">
        <PagerSettings FirstPageText="الاولى" LastPageText="الاخيرة"
            NextPageText="التالى" PreviousPageText="السابق" />
        <Columns>
            <asp:TemplateField>
                <HeaderTemplate>
                    
                        <table  class="tab3">
                            <tr class="tabbone3">
                            <td style="width:150px">
                                    <asp:Label ID="lblcname" runat="server" Text="اسم الجهة" meta:resourceKey="lblcname" />
                                </td>
                                <td style="width:200px">
                                    <asp:Label ID="lbladress" runat="server" Text="العنوان" meta:resourceKey="lbladress" />
                                </td>
                                <td style="width:100px">
                                    <asp:Label ID="lblpaidfees" runat="server" Text="النقود المدفوعة" meta:resourceKey="lblpaidfees" />
                                </td>
                                 <td style="width:150px">
                                    <asp:Label ID="lblstartofsubs" runat="server" Text="بداية الاشتراك" meta:resourceKey="lblstartofsubs" />
                                </td>

                                <td style="width:150px">
                                    <asp:Label ID="lblendofsubs" runat="server" Text="نهاية الاشتراك" meta:resourceKey="lblendofsubs" />
                                </td>


                                <td style="width:50px">
                                    <asp:Label ID="lblshow"  runat="server" Text="عرض" meta:resourceKey="lblshow" />
                                </td>
                                
                                
                            </tr>
                        </table>
                    
                </HeaderTemplate>
                <ItemTemplate>
                   
                        <table class="tab3">
                            <tr class="adel3">
                            <td style="width:150px">
                                    <asp:Label  ID="co" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("company"))) %>' />
                                </td>
                                 <td style="width:200px">
                                    <asp:Label  ID="add" runat="server" Text='<%# String.Format("{0} , {1}",Eval("address"),Eval("district")) %>' />
                                </td>
                                <td style="width:100px">
                                    <asp:Label  ID="paidfees" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("paidfees"))) %>' />
                                </td>
                                <td style="width:150px">
                                    <asp:Label  ID="startofsub" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("startofsub"))) %>' />
                                </td>
                                <td style="width:150px">
                                    <asp:Label ID="endofsub" runat="server" Text='<%# Eval("endofsub") %>' />
                                </td>

                                <td style="width:50px">
                                    <asp:LinkButton ID="display" CommandArgument='<%# String.Format("{0} , {1},{2},{3},{4}", Eval("companydesc"), Eval("country"), Eval("longitude"),Eval("latitude"),Eval("email1")) %>'
                                        runat="server" OnClick="display_Click" Text="عرض" meta:resourceKey="lblshow"></asp:LinkButton>
                                </td>
                                
                               
                                
                            </tr>
                        </table>
                   
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="getcusinfocurrentsub" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="currentsubs" Name="id" PropertyName="SelectedValue"
                Type="Int64" />
        </SelectParameters>
    </asp:SqlDataSource>
    <div id="detail" runat="server">
        <asp:Repeater ID="parentRepeater" runat="server" OnItemDataBound="parentRepeater_ItemDataBound">
            <SeparatorTemplate>
                <hr />
            </SeparatorTemplate>
            <ItemTemplate>
            
                <table>
                    <tr>
                        <td>
                            
                                <table class="tab3" >
                                    <tr class="tabbone3">
                                        <td style="width:100px">
                                            <asp:Label ID="lblend"   runat="server" Text="الكتاب/الدورية" meta:resourceKey="lblend"
                                                />
                                        </td>
                                        <td style="width:100px">
                                            <asp:Label ID="lblpadfees"    runat="server" Text="النشر" meta:resourceKey="lblpadfees"
                                                />
                                        </td>
                                        <td style="width:60px">
                                            <asp:Label ID="lbltype"     runat="server" Text="التردد" meta:resourceKey="lbltype" Width="40px" />
                                        </td>
                                        <td style="width:200px">
                                            <asp:Label ID="lblissn"    runat="server" Text="الرقم التعريفى" meta:resourceKey="lblissn"
                                                 />
                                        </td>
                                        <td style="width:100px">
                                            <asp:Label ID="lblstartofsubs"    runat="server" Text="بداية الاشتراك" meta:resourceKey="lblsatrtsub"
                                                 />
                                        </td>
                                        <td style="width:100px"> 
                                            <asp:Label ID="Label1"   runat="server" Text="نهاية الاشتراك" meta:resourceKey="lblendsub"
                                               />
                                        </td>
                                        <td style="width:60px">
                                            <asp:Label ID="Label2"  runat="server" Text="عدد النسخ" meta:resourceKey="lblcopyno"
                                                 />
                                        </td>
                                        <td style="width:80px">
                                            <asp:Label ID="Label3"    runat="server" Text="قيمة النسخة" meta:resourceKey="lblpees"
                                                 />
                                        </td>
                                    </tr>
                                    <tr class="adel3">
                                        <td style="width:100px">
                                            <asp:Label     ID="Label11" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("product"))) %>'
                                                 />
                                        </td>
                                        <td style="width:100px">
                                            <asp:Label    ID="paidfees" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("publisher"))) %>'
                                                 />
                                        </td>
                                        <td style="width:60px">
                                            <asp:Label    ID="Label12" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("freq"))) %>'
                                                 />
                                        </td>
                                        <td style="width:200px">
                                            <asp:Label    ID="Label13" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("issn"))) %>'
                                                />
                                        </td>
                                        <td style="width:100px">
                                            <asp:Label     ID="startofsub" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("startdate"))) %>'
                                                 />
                                        </td>
                                        <td style="width:100px">
                                            <asp:Label     ID="Label4" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("enddate"))) %>'
                                                />
                                        </td>
                                        <td style="width:60px">
                                            <asp:Label     ID="Label5" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("copyno"))) %>'
                                                 />
                                        </td>
                                        <td style="width:80px">
                                            <asp:Label    ID="Label6" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("copyprice"))) %>'
                                                />
                                        </td>
                                    </tr>
                                </table>
                           
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:GridView ID="GridView1" runat="server" 
                                AutoGenerateColumns="False" 
                                AllowPaging="True" GridLines="None" >
                                <RowStyle />
                                <Columns>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            
                                                <table >
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <table class="tab3">
                                                                    <tr class="tabbone3">
                                                                        <td style="width:300px">
                                                                            <asp:Label ID="Label7" runat="server" Text="ثمن النسخ" meta:resourceKey="arriveprice" />
                                                                        </td>
                                                                         <td style="width:300px">
                                                                            <asp:Label ID="Label9" runat="server" Text="مجموع النسخ " meta:resourceKey="noarrive" />
                                                                        </td>
                                                                        <td style="width:200px">
                                                                            <asp:Label ID="Label3" runat="server" Text="تم التسليم" meta:resourceKey="arrive" />
                                                                        </td>
                                                                       
                                                                        
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                            
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <table class="tab3">
                                                <tr class="adel3">
                                                   <td style="width:300px">
                                                        <asp:Label  ID="Label10" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "[\"total\"]")%>' />
                                                    </td>
                                                     <td style="width:300px">
                                                        <asp:Label  ID="Label8" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "[\"received\"]")%>' />
                                                    </td>
                                                    <td style="width:200px">
                                                        <asp:Label ID="arrive" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "[\"delivered\"]")%>' />
                                                    </td>
                                                    
                                                    
                                                </tr>
                                            </table>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <FooterStyle />
                                <PagerStyle  />
                                <SelectedRowStyle />
                                <HeaderStyle  />
                                <AlternatingRowStyle />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:Repeater>
    </div>
    <div align="center">
        <asp:Button style="margin:5px" ID="pressed" CssClass="zr3" runat="server" Text="انشىء تقرير" OnClick="LinkButton1_Click" meta:resourceKey="pressed" />
    </div>
</asp:Content>
